<include file="../header" />
<body class="J_scroll_fixed">
<script type="text/javascript" src="__ROOT__/statics/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="__ROOT__/statics/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__ROOT__/statics/js/ueditor/ueditor.all.min.js"></script>

<script type="text/javascript">
    $(function () {

        $("button#send").click(function() {

            var categoryName = $("input[name=categoryName]").val();
            if(categoryName == "") {
                alert("分类名称不能为空");
                return false;
            }

            $("form").submit();

        });


    });
</script>
<div class="wrap jj">
    <ul class="nav nav-tabs">
        <li><a href="{:U('category/index')}">病症信息</a></li>
        <li class="active"><a href="{:U('category/add')}">添加病症</a></li>
    </ul>

    <div class="common-form">
        <form  id='add' method="post" class="form-horizontal J_ajaxForm" action="{:U('category/editPost')}">
            <input type="hidden" name="id" value="{$info.category_id}" />
            <fieldset>
                <div class="control-group">
                    <label class="control-label">病症名称:</label>
                    <div class="controls">
                        <input type="text" class="input" name="categoryName" value="{$info.category_name}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">成熟产品:</label>
                    <div class="controls">
                        {:getEnumSelectWidget($statusEnum, "isFinished", $info['is_finished'], 0)}
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">需要医生:</label>
                    <div class="controls">
                        {:getEnumSelectWidget($statusEnum, "needDoctor", $info['need_doctor'], 0)}
                    </div>
                </div>
            </fieldset>

            <div class="form-actions">
                <button id='send' type="submit" class="btn btn-primary">更新</button>
                <a class="btn" href="__URL__">返回</a>
            </div>
        </form>
    </div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>